<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="renderer" content="webkit">
<title>东明家居销售部考核系统</title>
<!--[if lt IE 9]>
    <meta http-equiv="refresh" content="0;ie.html" />
<![endif]-->
    <link rel="shortcut icon" href="./images/icon.png" type="image/x-icon" />
<link rel="shortcut icon" href="favicon.ico">
<link href="./css/bootstrap.min.css" rel="stylesheet">
<link href="./css/font-awesome.min.css" rel="stylesheet">
<link href="./css/animate.css" rel="stylesheet">
<link href="./css/style.css" rel="stylesheet">
</head>
<body class="white-bg">
<div class="row wrapper wrapper-content animated fadeInRight">      
    <div class="index_con">
        <p>你好，欢迎登陆东明家居销售部考核系统</p>
        <p>登陆用户：<input id="username" /></p>
    </div>
</div>

<!-- 全局js --> 
<script src="js/jquery.min.js?v=2.1.4"></script> 
<script src="js/bootstrap.min.js?v=3.3.6"></script>

<script>
    $(function () {
        init()
    })

    function init() {
        //查询类别下拉框
        $.ajax({
            url: "./goSaleBack/initPage", //请求的url地址
            xhrFields: {
                withCredentials: true
            },
            dataType: "json", //返回格式为json
            type: "POST", //请求方式
            processData: false, //对表单data数据是否进行序列化
            contentType: false, //dataType设置你收到服务器数据的格式
            headers: {
                'Content-Type': 'application/json'
            },
            beforeSend: function() {
                //请求前的处理
            },
            success: function(data) {
                if(data.status=="0"){
                    // top.location.href = "../../login.html";
                    window.location.href="./login.html";
                }
                if(data.status=="1"){
                    $("#username").attr("value",data.username);
                    $("#username").attr("style","border: 0px;");

                }
            },
            complete: function() {
                //请求完成的处理
            },
            error: function() {}
        });
    }
</script>
</body>
</html>
